<!DOCTYPE html>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" layout:decorate="~{layout}">

<head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />

    <title th:text="#{cas.mfa.googleauth.pagetitle}">Google Authentication Registration Review View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag" />
</head>

<body id="cas">
    <main role="main" class="container mt-3 mb-3">
        <div layout:fragment="content" id="login" class="mdc-card p-4 m-auto w-lg-66">
            <h3 th:text="#{screen.authentication.gauth.register}">Your account is not registered. Use the below settings
                to
                register your device with CAS.</h3>

            <form method="post" id="fm1" class="fm-v clearfix" th:action="@{/login}">
                <div class="d-flex flex-column align-items-center">
                    <img th:src="@{/otp/qrgen(key=${keyUri})}" />
                    <div class="my-2">
                        <p th:utext="#{screen.authentication.gauth.key(${key.getSecretKey()})}">Secret key to register
                            is...</p>
                    </div>

                    <div class="border-rounded d-flex align-items-start mb-4 px-4">
                        <p class="mr-2">Scratch Codes:</p>
                        <ul class="">
                            <li th:each="code : ${key.getScratchCodes()}" th:text="${code}">code</li>
                        </ul>
                    </div>
                    <input type="hidden" name="_eventId" value="submit" />
                    <div class="d-flex justify-content-center">
                        <button class="mdc-button mdc-button--raised mr-2" name="submit" accesskey="l" value="Register">
                            <span class="mdc-button__label" th:text="#{screen.welcome.button.register}">Register</span>
                        </button>
                        <button class="mdc-button mdc-button--raised mr-2" name="print" accesskey="p" type="button"
                            onclick="window.print();">
                            <span class="mdc-button__label" th:text="#{screen.welcome.button.print}">Print</span>
                        </button>
                        <button class="mdc-button mdc-button--outlined" name="back" accesskey="c" type="button" value="Cancel"
                            onclick="location.href = location.href;"
                            th:value="#{screen.pm.button.cancel}">
                            <span class="mdc-button__label" th:text="#{screen.pm.button.cancel}">Cancel</span>
                        </button>
                    </div>
                </div>
                <input type="hidden" name="execution" th:value="${flowExecutionKey}" />
            </form>
        </div>
    </main>
</body>

</html>